Testing Monte Carlo
You've just written a brand new Monte Carlo code. It's producing vast amounts of data on your fast new computer. How do know if that random looking time series will average to a beautiful result and lead to deep insight, or is it simply random noise from the physics of some other universe?
There are several techniques we can use to verify that the codes we write are working correctly.
- Unit testing
This is standard software engineering (or *should* be standard). This involves small drivers to test individual classes or routines. It's good for verifying small, easily understood pieces before integrating into a larger system and for regression testing (making sure the latest change didn't break something). - Solve simple systems with analytic or well-known answers.
The harmonic oscillator is popular. For QMC, H2 is very well known, and very accurate answers are known from other techniques. - Compute internal quantities in multiple ways.
The best example in QMC is the local energy - compute the derivatives analytically and numerically. In PIMC there are multiple energy estimators. - Compute system values with another integration method.
It seems that computers are fast enough that we should be able to use grid-based methods to compute answers for small numbers (1-3) of particles.
For QMC, shutting off the electron-electron interaction simplifies the problem, and Mathematica can handle the resulting integrals (numerically, not symbolically) - Comparison with literature
Compare with experiment and answers obtained by other methods.
No comments:
Post a Comment